﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin1/SiteAdmin.master" AutoEventWireup="true" CodeFile="EditTour.aspx.cs" Inherits="EditTour" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<%@ Register Assembly="CKFinder" Namespace="CKFinder" TagPrefix="CKFinder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style>
        .ckleft {
            float: left;
        }
    </style>
    <script src="../ckeditor/ckeditor.js"></script>
    <script src="../ckfinder/ckfinder.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="Server">
    <%-- Box Edit Category--%>
    <asp:Panel ID="panel_Add" Width="100%" runat="server" Visible="true">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-info-sign"></i>
                    </span>
                    <span class="icon1">
                        <asp:LinkButton ID="lbt_ClosAdd" runat="server" OnClick="lbt_ClosAdd_Click"><img src="img/icons/16/close.png" /></asp:LinkButton>
                    </span>
                    <h5>Chỉnh tour cơ bản</h5>
                </div>
                <div class="widget-content nopadding">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <div class="control-group">
                                <label class="control-label">Tên tour tiếng anh</label>
                                <div class="controls">
                                    <div class="ctr">
                                        <div class="rw">
                                            <asp:TextBox ID="txt_Name" runat="server" CssClass="null"  Width="200" AutoPostBack="true"></asp:TextBox>
                                        </div>
                                        <div class="rw_text">Tên tour tiếng việt</div>
                                        <div class="rw">
                                            <asp:TextBox ID="txt_NameVN" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text"></div>
                                        <div class="rw">
                                        </div>
                                    </div>
                                    <div style="height: 10px;">
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Chưa nhập tên tiếng việt" ControlToValidate="txt_Name" Display="Static" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Chưa nhập tên tiếng anh" ControlToValidate="txt_NameVN" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="val">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Số ngày tiếng anh</label>
                                <div class="controls">
                                    <div class="ctr">
                                        <div class="rw">
                                            <asp:TextBox ID="txt_SoNgay" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text">Số ngày tiếng việt</div>
                                        <div class="rw">
                                            <asp:TextBox ID="txt_SoNgayVN" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text"></div>
                                        <div class="rw">
                                        </div>
                                    </div>
                                    <div style="height: 10px;">
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Chưa nhập số ngày" ControlToValidate="txt_SoNgay" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Chưa nhập số ngày" ControlToValidate="txt_SoNgayVN" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="val">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Ngày khởi hành tiếng anh</label>
                                <div class="controls">
                                    <div class="ctr">
                                        <div class="rw">
                                            <asp:TextBox ID="txt_DatStart" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text">Ngày khởi hành tiếng việt</div>
                                        <div class="rw">
                                            <asp:TextBox ID="txt_DatStartVN" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text">Trạng thái</div>
                                        <div class="rw">
                                            <asp:RadioButtonList ID="rad_Available" runat="server" RepeatDirection="Horizontal" Style="margin-top: 5px;">
                                                <asp:ListItem Selected="True" Value="True">Hiện</asp:ListItem>
                                                <asp:ListItem Value="False">Ẩn</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </div>
                                    </div>
                                    <div style="height: 10px;">
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server"
                                                ErrorMessage="Chưa nhập số ngày" ControlToValidate="txt_DatStart" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server"
                                                ErrorMessage="Chưa nhập số ngày" ControlToValidate="txt_DatStartVN" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="val">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Giá cơ bản</label>
                                <div class="controls">
                                    <div class="ctr">
                                        <div class="rw">
                                            <asp:TextBox ID="txt_UnitPrice" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text">Giá trẻ em</div>
                                        <div class="rw">
                                            <asp:TextBox ID="txt_PriceChidren" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text">Giá trẻ nhỏ</div>
                                        <div class="rw">
                                            <asp:TextBox ID="txt_PriceBaby" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div style="height: 10px;">
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Chưa nhập giá tour cơ bản" ControlToValidate="txt_UnitPrice" Display="Dynamic" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Chưa giá trẻ em" ControlToValidate="txt_PriceChidren" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="val">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ErrorMessage="Chưa giá trẻ nhỏ" ControlToValidate="txt_PriceBaby" ValidationGroup="a" Style="color: red;"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                     <div style="height: 10px;">
                                        <div class="val">
                                            <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txt_UnitPrice"
                                                ErrorMessage="Nhập giá là số nguyên có giá trị hơn 0" Operator="GreaterThan" Type="Integer" ValueToCompare="0" Display="Dynamic" ValidationGroup="a" Style="color: red;"></asp:CompareValidator>
                                        </div>
                                        <div class="val">
                                            <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txt_PriceChidren"
                                                ErrorMessage="Nhập giá trị số" Operator="GreaterThan" Type="Integer" ValueToCompare="-1" Display="Dynamic" ValidationGroup="a" Style="color: red;"></asp:CompareValidator>
                                        </div>
                                        <div class="val">
                                            <asp:CompareValidator ID="CompareValidator6" runat="server" ControlToValidate="txt_PriceBaby"
                                                ErrorMessage="Nhập giá trị số" Operator="GreaterThan" Type="Integer" ValueToCompare="-1" Display="Dynamic" ValidationGroup="a" Style="color: red;"></asp:CompareValidator>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Phụ thu người nước ngoài</label>
                                <div class="controls">
                                    <div class="ctr">
                                        <div class="rw">
                                            <asp:TextBox ID="txt_Foreigner" runat="server" CssClass="null" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text">Phụ thu phòng đơn</div>
                                        <div class="rw">
                                            <asp:TextBox ID="txt_Singleroom" runat="server" Width="200"></asp:TextBox>
                                        </div>
                                        <div class="rw_text">Khuyến mãi</div>
                                        <div class="rw">
                                            <asp:RadioButtonList ID="rad_Proto" runat="server" RepeatDirection="Horizontal" Style="margin-top: 5px;" BorderColor="#00CC66" BorderStyle="None">
                                                <asp:ListItem Selected="True" Value="True">Có</asp:ListItem>
                                                <asp:ListItem Value="False">Không</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </div>
                                    </div>
                                </div>
                                <div style="height: 10px;">
                                    <div class="val">
                                        <%--<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txt_Foreigner"
                                        ErrorMessage="Giá phụ thu người nước ngoài >= 0 "  Type="Integer" Display="Dynamic" ValidationGroup="a" style="color:red;"></asp:CompareValidator>--%>
                                    </div>
                                    <div class="val">
                                        <%--<asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="txt_Singleroom"
                                        ErrorMessage="Giá phụ thu phòng đơn >= 0"  Type="Integer"  Display="Dynamic" ValidationGroup="a" style="color:red;"></asp:CompareValidator>--%>
                                    </div>
                                    <div class="val">
                                    </div>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Ảnh minh họa</label>
                                <div class="controls">
                                    <asp:TextBox ID="txt_Image_Edit" runat="server" Width="800">
                                    </asp:TextBox><input id="Browser1" value="Chọn ảnh" type="button" />
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Khách sạn</label>
                                <div class="controls">
                                    <div class="ctr">
                                        <div class="rw">
                                            <asp:DropDownList ID="ddl_Hotel" runat="server" Width="200px"></asp:DropDownList>
                                        </div>
                                        <div class="rw_text">Phương tiện</div>
                                        <div class="rw">
                                            <asp:DropDownList ID="ddl_Transport" runat="server" Width="200px"></asp:DropDownList>
                                        </div>
                                        <div class="rw_text">Thể loại</div>
                                        <div class="rw">
                                            <asp:DropDownList ID="ddl_Category" runat="server" AutoPostBack="true" Width="200px"></asp:DropDownList>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Địa điểm</label>
                                <div class="controls">
                                    <asp:CheckBoxList ID="ck_Location" runat="server" RepeatLayout="Table" Font-Bold="False" RepeatDirection="Horizontal" RepeatColumns="8" ForeColor="#003366" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" EnableTheming="True" CellPadding="5" CellSpacing="8" ClientIDMode="Inherit" RenderWhenDataEmpty="False" ValidateRequestMode="Inherit" AutoPostBack="False" BorderStyle="None"></asp:CheckBoxList>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Lịch trình tiếng anh</label>
                                <div class="controls">
                                    <CKEditor:CKEditorControl ID="CKEditor_Description" runat="server"></CKEditor:CKEditorControl>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Lịch trình tiếng việt</label>
                                <div class="controls">
                                    <CKEditor:CKEditorControl ID="CKEditor_DescriptionVN" runat="server"></CKEditor:CKEditorControl>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Bảng giá tiếng anh</label>
                                <div class="controls">
                                    <CKEditor:CKEditorControl ID="CKEditor_Price" runat="server"></CKEditor:CKEditorControl>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Bảng giá tiếng việt</label>
                                <div class="controls">
                                    <CKEditor:CKEditorControl ID="CKEditor_PriceVN" runat="server"></CKEditor:CKEditorControl>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label"></label>
                                <div class="controls">
                                    <asp:Button ID="btnInsert" runat="server" Text="Save change" OnClick="btnSaveEdit_Click" class="btn btn-success" ValidationGroup="a" />
                                </div>
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
            </div>
    </asp:Panel>
    <script language="javascript" type="text/javascript">
        $(function () {
            $("#Browser").click(function () {
                var ckfinder = new CKFinder();
                ckfinder.selectActionFunction = function (fileUrl) {
                    $("#body_txt_ImageAdd").val(fileUrl);
                };
                ckfinder.popup();
            });
            $("#Browser1").click(function () {
                var ckfinder = new CKFinder();
                ckfinder.selectActionFunction = function (fileUrl) {
                    $("#body_txt_Image_Edit").val(fileUrl);
                };
                ckfinder.popup();
            });
        });

    </script>
</asp:Content>

